import h from './mySnabbdom/h'
import patch from "./mySnabbdom/patch";
// 创建patch函数
// let one = h('h1',{}, [
//     h('span',{}, '节点一'),
//     h('span',{},'节点二'),
//     h('p',{},[
//         h('span',{},'下级内容')
//     ])
// ])
let two = h('p',{},[
    h('span',{ key: 'E'},'这是E123'),
    h('span',{ key: 'A'},'这是A'),
    h('span',{ key: 'B'},'这是B'),
    h('span',{ key: 'C'},'这是C'),
    h('span',{ key: 'D'},'这是D'),
    h('span',{ key: 'F'},'这是F'),

])
let three = h('p', {}, [
    h('span',{ key: 'A'},'这是A'),
    h('span',{ key: 'B'},'这是B123'),
    h('span',{ key: 'C'},'这是C123'),
    h('span',{ key: 'D'},'这是D'),

])
// let two = h('p', {key:'one'},'这是one')
// let three = h('p', {key:'one'},'这是two')
const container = document.getElementById('container')
patch(container, two)
let btn = document.getElementById('btn')
btn.onclick = function () {
    patch(two,three)
}
